local unitDefs = {

WEAPONS_PLATFORM = {
  name                = "Weapons Testing Platform",
  description         = "Helps me test weapons :)",
  
  objectName          = "weapons_platform.s3o", --"weapons_platform3k.obj",
  script              = "weapons_platform.lua",
  buildPic            = "weapons_platform.png",
  iconType            = "vehicle",  
  category            = [[LAND TANK WEAPON WEAK_ARMOR]],
  TEDClass            = "TANK", 
  movementClass       = "HOVER1",
  
  -- Cost
  buildCostMetal      = 100,  
  buildCostEnergy     = 0,
  buildTime           = 1000,
  --mass                = 100,    

  -- Damage
  maxDamage           = 10000,
  idleAutoHeal        = 5,
  idleTime            = 900,  

  -- Movement and Pathfinding
  footprintX          = 6,
  footprintZ          = 6,  
  maxVelocity         = 2.0,
  maxReverseVelocity  = 0,
  acceleration        = 0.04,
  brakeRate           = 0.04,
  turnRate            = 400,
  turnInPlace         = true,  
  maxSlope            = 40,
  canHover            = true,

  -- Abilities
  canMove             = true,  
  canAttack           = true,
  canGuard            = true,
  canPatrol           = true,

  -- Detection  
  sightDistance       = 500,
  seismicSignature    = 0,  

  -- Weapons
  explodeAs           = "UNIT_EXPLOSION_MEDIUM1",  
  selfDestructAs      = "UNIT_SELFD_MEDIUM1", 
  noChaseCategory     = [[SUB PLANE HELICOPTER]],  

  weapons = {
    [1] = {
      def                = "C_MACHINEGUN",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       =   0,
      --maxAngleDif        = 160,
    },
    [2] = {
      def                = "C_CANNON_AUTOCANNON_1BARREL",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       =  45,
      --maxAngleDif        = 160,
    },
    [3] = {
      def                = "C_CANNON_AUTOCANNON_2BARRELS",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       =  90,
      --maxAngleDif        = 160,
    },
    [4] = {
      def                = "C_CANNON_AA_1BARREL",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       = 135,
      --maxAngleDif        = 160,
    },
    [5] = {
      def                = "C_CANNON_AA_2BARRELS",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       = 180,
      --maxAngleDif        = 160,
    },
    [6] = {
      def                = "C_CANNON_AA_3BARRELS",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       =-135,
      --maxAngleDif        = 160,
    },
    [7] = {
      def                = "C_CANNON_AA_4BARRELS",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       = -90,
      --maxAngleDif        = 160,
    },
    [8] = {
      def                = "C_CANNON_AA_6BARRELS",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
      --mainDirAngle       = -45,
      --maxAngleDif        = 160,
    },
    [9] = {
      def                = "C_CANNON_AA_CLUSTER",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
    },
    [10] = {
      def                = "C_CANNON_AA_MEDIUM_1BARREL",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
    },
    [11] = {
      def                = "C_CANNON_AA_MEDIUM_2BARRELS",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
    },
    [12] = {
      def                = "C_CANNON_AA_HEAVY",
      onlyTargetCategory = [[BUILDING TANK SHIP SUB PLANE HELICOPTER]],
    },
    [13] = {
      def                = "C_GRENADE_HELICOPTER",
    },    
  },
  
  sfxtypes = {
    explosiongenerators = {
      --"custom:FLARE_CANNON_LIGHT",  --"custom:FLARE_CANNON_HEAVY",
    },
  },  

  customParams = {
    wreckModels = { "weapons_platform_dead.s3o", "weapons_platform_dead.s3o" },
    heapModels = { "3x3d.3do" },

    constructionWireframe = true,

	  soundCategory = "VEHICLE1",
  
	  armorThickness = 0,
	
	  lightDamageChance = 0.2,	
	  mediumDamageChance = 0.4,
	  heavyDamageChance = 0.4,
  },
},
}

return lowerkeys(unitDefs)